//
//  LFAlartClockTableViewCell.m
//  AlarmClock
//
//  Created by LF on 2017/4/26.
//  Copyright © 2017年 LF. All rights reserved.
//

#import "LFAlartClockTableViewCell.h"

@interface LFAlartClockTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *alarmLb;
@property (weak, nonatomic) IBOutlet UILabel *timeLb;
@property (weak, nonatomic) IBOutlet UILabel *titleLb;
@property (weak, nonatomic) IBOutlet UILabel *subTitleLb;
@property (weak, nonatomic) IBOutlet UILabel *bodyLb;
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UISwitch *switchBtn;


@end

@implementation LFAlartClockTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setDataModel:(LFAlarmClockModel *)dataModel {
    _dataModel = dataModel;
    
    self.timeLb.text = [NSString stringWithFormat:@"%@  %@",dataModel.date, dataModel.time];
    self.titleLb.text = dataModel.message_title;
    self.subTitleLb.text = dataModel.message_subTitle;
    self.bodyLb.text = dataModel.message_body;
    self.imgView.image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:dataModel.image ofType:@"jpg"]];
    self.switchBtn.on = dataModel.isOn;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
